//
//  NSArray+BIDArrayToString.m
//  zhangqitong
//
//  Created by mal on 16/1/29.
//  Copyright © 2016年 mal. All rights reserved.
//

#import "NSArray+BIDArrayToString.h"

@implementation NSArray (BIDArrayToString)

- (NSString*)arr2StringWithComponent:(NSString *)component
{
    NSMutableString *strResult = [NSMutableString string];
    if(self.count>0)
    {
        for(int i=0; i<self.count; i++)
        {
            if(i==0)
            {
                [strResult appendString:self[i]];
            }
            else
            {
                [strResult appendFormat:@"%@%@", component, self[i]];
            }
        }
    }
    return strResult;
}

@end
